Skip to content

fix: replace deprecated pkg_resources with pathlib in benchmark test#485

Merged
thpierce merged 1 commit intoaws:masterfrom
thpierce:fix/pkg-resources-removal
Mar 20, 2026
Merged

fix: replace deprecated pkg_resources with pathlib in benchmark test#485
thpierce merged 1 commit intoaws:masterfrom
thpierce:fix/pkg-resources-removal

Conversation

@thpierce
Copy link
Contributor

Description

PR checks have been failing across Python 3.9-3.12 due to ModuleNotFoundError: No module named 'pkg_resources' in tests/test_local_sampling_benchmark.py.

pkg_resources (from setuptools) is deprecated and no longer bundled by default in newer Python versions. This causes test collection to fail entirely, blocking all core and ext tests.

Fix

Replace pkg_resources.resource_filename with pathlib.Path, which is stdlib and works on all supported Python versions.

Relates to failing checks on PRs like #469, #480.

pkg_resources is no longer bundled by default in Python 3.12+,
causing ModuleNotFoundError that blocks all test collection.
Replace with pathlib which is stdlib and works on all supported versions.
@thpierce thpierce requested a review from a team as a code owner March 19, 2026 22:24
@thpierce thpierce merged commit fb91200 into aws:master Mar 20, 2026
8 of 13 checks passed
@thpierce thpierce deleted the fix/pkg-resources-removal branch March 20, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant